<div class="form">

	<?php
	$form = $this->beginWidget('CActiveForm',
		array(
		'id'=>'camera-form',
		'enableAjaxValidation'=>false,
		));
	?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,
			'name'); ?>
		<?php echo $form->textField($model, 'name',
			array('size'=>60, 'maxlength'=>255)); ?>
		<?php echo $form->error($model,
			'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,
			'ipAddress'); ?>
		<?php echo $form->textField($model, 'ipAddress',
			array('size'=>60, 'maxlength'=>255)); ?>
		<?php echo $form->error($model,
			'ipAddress'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,
			'channel'); ?>
		<?php echo $form->textField($model, 'channel',
			array('size'=>10)); ?>
		<?php echo $form->error($model, 'channel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,
			'roomId'); ?>
		<?php
		echo $form->dropDownList(
			$model, 'roomId', CHtml::listData(Room::model()->findAll(), '_id', 'name')
		);
		?>
		<?php echo $form->error($model, 'roomId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,
			'username'); ?>
		<?php echo $form->textField($model, 'username',
			array('size'=>60, 'maxlength'=>255)); ?>
		<?php echo $form->error($model,
			'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,
			'password'); ?>
		<?php echo $form->passwordField($model, 'password',
			array('size'=>60, 'maxlength'=>255)); ?>
		<?php echo $form->error($model,
			'password'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->